const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require('path');
const fs = require('fs');

module.exports = {
  entry: "./bootstrap.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "bootstrap.js",
  },
  mode: "development",
  plugins: [
    new CopyWebpackPlugin(['index.html'])
  ],
  devServer: {
    host: '0.0.0.0', // 设置监听的地址，默认是localhost
    port: 8888, // 设置监听的端口号，默认是8080
    https: true,
    key: fs.readFileSync('./test.key'),
    cert: fs.readFileSync('./test.crt')
  }
};
